home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / os / sprite.X11R3 / hosts.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-26  |  3.7 KB  |  166 lines

  1. /*-
  2.  * hosts.c --
  3.  *    Functions to pretend to have a host access list.
  4.  *
  5.  * Copyright (c) 1987 by the Regents of the University of California
  6.  *
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  *
  16.  */
  17. #ifndef lint
  18. static char rcsid[] =
  19.     "$Header: /mic/X11R3/src/cmds/Xsp/os/sprite/RCS/hosts.c,v 1.6 89/10/25 17:22:02 tve Exp $ SPRITE (Berkeley)";
  20. #endif lint
  21.  
  22. #include    "spriteos.h"
  23.  
  24. #include    "Xproto.h"
  25. #include    "dixstruct.h"
  26. #include    "opaque.h"
  27.  
  28. /*-
  29.  *-----------------------------------------------------------------------
  30.  * ResetHosts --
  31.  *    Reset the host list from the initialization file, or wherever.
  32.  *
  33.  * Results:
  34.  *    None.
  35.  *
  36.  * Side Effects:
  37.  *    None.
  38.  *
  39.  *-----------------------------------------------------------------------
  40.  */
  41. /*ARGSUSED*/
  42. ResetHosts (display)
  43.     char    *display;    /* ASCII display number */
  44. {
  45. }
  46.  
  47. /*-
  48.  *-----------------------------------------------------------------------
  49.  * AddHost --
  50.  *    Add a host to those allowed access
  51.  *
  52.  * Results:
  53.  *    None.
  54.  *
  55.  * Side Effects:
  56.  *    None.
  57.  *
  58.  *-----------------------------------------------------------------------
  59.  */
  60. int
  61. AddHost (client, family, length, pAddr)
  62.     ClientPtr        client;
  63.     int              family;
  64.     unsigned         length;
  65.     pointer       pAddr;
  66. {
  67.     return (Success);
  68. }
  69.  
  70. /*-
  71.  *-----------------------------------------------------------------------
  72.  * RemoveHost --
  73.  *    Remove a host from those allowed access.
  74.  *
  75.  * Results:
  76.  *    None.
  77.  *
  78.  * Side Effects:
  79.  *    None.
  80.  *
  81.  *-----------------------------------------------------------------------
  82.  */
  83. int
  84. RemoveHost (client, family, length, pAddr)
  85.     ClientPtr        client;
  86.     int              family;
  87.     unsigned      length;
  88.     pointer       pAddr;
  89. {
  90.     return (Success);
  91. }
  92.  
  93. /*-
  94.  *-----------------------------------------------------------------------
  95.  * GetHosts --
  96.  *    Get all the hosts in the access control list.
  97.  *
  98.  * Results:
  99.  *    The number of hosts, size of the data buffer and whether the
  100.  *    mechanism is enabled.
  101.  *    Since there is no access control mechanism (short of chmod...)
  102.  *    this always returns 0 hosts, 0 bytes of data and access-control
  103.  *    disabled.
  104.  *
  105.  * Side Effects:
  106.  *    None.
  107.  *
  108.  *-----------------------------------------------------------------------
  109.  */
  110. int
  111. GetHosts (data, pNumHosts, pEnabled)
  112.     pointer       *data;
  113.     int              *pNumHosts;
  114.     BOOL      *pEnabled;
  115. {
  116.     *data = 0;
  117.     *pEnabled = DisableAccess;
  118.     *pNumHosts = 0;
  119.     return (0);
  120. }
  121.  
  122. /*-
  123.  *-----------------------------------------------------------------------
  124.  * ChangeAccessControl --
  125.  *    Turn the access control mechanism on or off....Ha!
  126.  *
  127.  * Results:
  128.  *    None.
  129.  *
  130.  * Side Effects:
  131.  *    None.
  132.  *
  133.  *-----------------------------------------------------------------------
  134.  */
  135. int
  136. ChangeAccessControl (client, fEnabled)
  137.     ClientPtr      client;
  138.     int          fEnabled;
  139. {
  140.     return (BadImplementation);
  141. }
  142.  
  143. /*-
  144.  *-----------------------------------------------------------------------
  145.  * InvalidHost --
  146.  *    Used by the connection managers to decide if a connection should
  147.  *    be allowed. First argument tells the type of connection and next
  148.  *    two are the parameters for the connection.
  149.  *
  150.  * Results:
  151.  *    TRUE if not ok. FALSE if ok.
  152.  *
  153.  * Side Effects:
  154.  *    None.
  155.  *
  156.  *-----------------------------------------------------------------------
  157.  */
  158. Bool
  159. InvalidHost (type, p1, p2)
  160.     int        type;     /* Connection type */
  161.     int        p1;          /* UID for Pdev, family for TCP */
  162.     int        p2;          /* HostID for Pdev, addr for TCP */
  163. {
  164.     return (FALSE);
  165. }
  166.